using Microsoft.EntityFrameworkCore;
using Admin2000.Backend.Api.Entity;

namespace Admin2000.Backend.Api.Database
{
    /// <summary>
    /// 数据库上下文 实体对应的数据表 以及连接参数
    /// </summary>

    public class Admin2000Db:DbContext
    {
        public DbSet<Users> Users{get;set;}
        public DbSet<Roles> Roles{get;set;}

        public DbSet<UserRole> UserRoles{get;set;}


          protected override void OnConfiguring(DbContextOptionsBuilder options)
          {
              options.UseSqlServer(@"server=.;database=Admin2000;uid=sa;pwd=123");
          }
    }

}

